<?php
$this->breadcrumbs=array();

$this->sidebarTop = array(
    'label' => Yii::t('BackEnd', 'Config manager'),
    'link' => "#"
);

$this->moduleName = "ConfigGroup";

$this->slidebar = Backend::getModuleSlideBar('Setting', '/configGroup/index', 'configuration');

$this->menu=array(
array('label'=>Yii::t('BackEnd', 'Delete'), 'itemOptions'=>array('style'=>'cursor:pointer', 'onclick'=>'deleteAll("form-admin", "/configGroup/delete");')),
	array('label'=>Yii::t('BackEnd', 'List'), 'url'=>array('index')),
	array('label'=>Yii::t('BackEnd', 'Create'), 'url'=>array('create')),
);

$this->title = Yii::t("BackEnd", "Manage").": ". Yii::t('BackEnd',"Config Groups");
?>
<?php //echo CHtml::link(Yii::t('BackEnd', 'Advanced Search'),'#',array('class'=>'search-button')); ?>
<div class="search-form">
    <?php $this->renderPartial('_search',array(
        'model'=>$model,
    )); ?>
<?php Yii::app()->clientScript->registerScript('search', "
        $('.search-button').click(function(){
            $('.search-form').toggle();
            return false;
        });
        $('.search-form form').submit(function(){
            $.fn.yiiGridView.update('config-group-grid', {
                data: $(this).serialize()
            });
            return false;
        });
    ");?>
</div><!-- search-form -->

<?php echo CHtml::beginForm('#', 'post', array('id'=>'form-admin', 'name'=>'frmAdmin')); ?><input type="hidden" id="moduleName" value="ConfigGroup"/>
<?php $this->widget('application.widgets.admin.GridView', array(
	'id'=>'config-group-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		'id',
		array(
            'name' => "name",
            'value' => $data->name,
            'htmlOptions' => array('style'=>'text-align:left;')
        ),
        array(
            'name' => "description",
            'value' => $data->description,
            'htmlOptions' => array('style'=>'text-align:left;')
        ),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
<?php echo CHtml::endForm(); ?>